<template>
  <el-dialog
    title="拒绝原因!"
    :visible.sync="dialogVisible"
    width="30%"
  >
    <span><div>拒绝原因:</div><textarea v-model="rejReason" type="text" style="width: 100%;height: 30px;margin-top:10px;resize: none"></textarea></span>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="submit">提 交</el-button>
    </span>
  </el-dialog>
</template>

<script>
  /*eslint-disable*/
  import {getRefuse} from "../../utils/productcheck";

  export default {
    name: "Pass",
    data() {
      return {
        dialogVisible: false,
        rejReason:"",
        rejectItem:{}
      }
    },
    methods: {
      getDoReFuse(rejectItem){
        this.rejectItem=rejectItem;
        this.dialogVisible=true
      },
      submit(){
        getRefuse('/operatingReject',{  
          "porcelainCode":this.rejectItem.porcelainCode,
          "auditContent":this.rejReason
        });
        this.$emit('switchRejStatus');
        this.dialogVisible = false
      }
    },
  }
</script>

<style scoped>
  .dialog-footer{
    display: flex;align-items: center;justify-content: center;
  }
</style>
